import request from '@/utils/request'

// 播放视频
export function playVideo(params) {
  return request({
    url: '/device/video/play',
    method: 'get',
    params: params
  })
}

export function stopVideo(key) {
  return request({
    url: '/device/video/stop',
    method: 'get',
    params: {
      key: key
    }
  })
}


//获取录像设备的通道列表
export function videoChannels(id) {
  return request({
    url: '/device/video/' + id + '/channelList',
    method: 'get'
  })
}

//判断设备是否是视频设备
export function isVideoDevice(id) {
  return request({
    url: '/device/video/isVideoDevice',
    method: 'get',
    params: {
      id: id
    }
  })
}


// 视频监控树
export function videoTree(id) {
  return request({
    url: '/device/video/tree',
    method: 'get'
  })
}
